{
/* Don't complain if we're in HVM and there are some extra mappings:
* The qemu helper process has an untyped mapping of this dom's RAM
- * and the HVM restore program takes another. */
+ * and the HVM restore program takes another. Additionally, if stub
+ * domain is active then it also has an untyped mapping of original
+ * domain's RAM. */
if ( !(shadow_mode_external(v->domain)
- && (page->count_info & PGC_count_mask) <= 3
+ && (page->count_info & PGC_count_mask) <= 4
&& (page->u.inuse.type_info & PGT_count_mask) == 0) )
{
SHADOW_ERROR("can't find all mappings of mfn %lx: "